package com.liuyu.common.framework.feignclient.api.feign.facade;

import com.liuyu.common.framework.common.service.cmd.PermitCmd;
import com.liuyu.common.framework.common.service.cmd.UserHisQueryCmd;
import com.liuyu.common.framework.common.service.condition.CodeCondition;
import com.liuyu.common.framework.common.service.condition.TranslateReq;
import com.liuyu.common.framework.common.service.condition.UserExtCondition;
import com.liuyu.common.framework.common.service.vo.UserHisVo;
import com.liuyu.common.framework.feignclient.api.feign.sentinel.Power3ApiCloudSentinelFallback;
import com.liuyu.common.framework.power.access.service.vo.AccessCondition;
import com.liuyu.common.framework.power.account.vo.*;
import com.liuyu.common.framework.power.app.vo.*;
import com.liuyu.common.framework.power.batchimport.vo.ImportData;
import com.liuyu.common.framework.power.cmd.*;
import com.liuyu.common.framework.power.commoncode.vo.CommonCodeCondition;
import com.liuyu.common.framework.power.commontype.vo.CommonTypeCond;
import com.liuyu.common.framework.power.commontype.vo.CommonTypeVo;
import com.liuyu.common.framework.power.company.vo.CompanyCondition;
import com.liuyu.common.framework.power.company.vo.CompanyInfoVo;
import com.liuyu.common.framework.power.grade.vo.GradeCondition;
import com.liuyu.common.framework.power.grade.vo.GradeVo;
import com.liuyu.common.framework.power.gradeext.vo.GradeExtCond;
import com.liuyu.common.framework.power.gradeext.vo.GradeExtVo;
import com.liuyu.common.framework.power.gradetask.vo.GradeTaskTreeCond;
import com.liuyu.common.framework.power.menu.vo.MenuCondition;
import com.liuyu.common.framework.power.menu.vo.MenuQueryCmd;
import com.liuyu.common.framework.power.menu.vo.MenuVo;
import com.liuyu.common.framework.power.oauth2.vo.OauthClientCond;
import com.liuyu.common.framework.power.oauth2.vo.OauthClientDetailVo;
import com.liuyu.common.framework.power.taglib.vo.TagDetailTreeVo;
import com.liuyu.common.framework.power.taglib.vo.TaglibCondition;
import com.liuyu.common.framework.power.task.vo.TaskCodeResult;
import com.liuyu.common.framework.power.task.vo.TaskCondition;
import com.liuyu.common.framework.power.task.vo.TaskVo;
import com.liuyu.common.framework.power.user.vo.UserVo;
import com.liuyu.common.framework.power.usergrade.vo.UserGradeExtendVo;
import com.liuyu.common.framework.power.usergrade.vo.UserGradeVo;
import com.liuyu.common.framework.power.vo.CommonCode;
import com.liuyu.common.framework.power.vo.MsgTemplateCondition;
import com.liuyu.common.framework.power.vo.VueTree;
import com.liuyu.common.framework.utils.Page;
import com.liuyu.common.framework.web.response.ApiResponse;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import other.liuyu.common.framework.feign.interceptor.PowerCloudFeignInterceptorConfig;
import schema.code.model.query.CpsDataDictionaryQuery;
import schema.code.model.query.CpsDataDictionaryTypeQuery;
import schema.code.model.vo.CpsDataDictionaryVO;
import schema.dto.*;

import jakarta.validation.Valid;

import java.io.IOException;
import java.util.List;

/**
 * @ClassName power3CloudFeignClient
 * @Description: 集中权限接口调用
 * @Author: liuyu
 * @Date: Created in 2020/5/12 16:25
 * @Version: 1
 * @Modified By:
 */
@FeignClient(value = "power3-cloud-api", fallbackFactory = Power3ApiCloudSentinelFallback.class, configuration = PowerCloudFeignInterceptorConfig.class)
public interface Power3ApiCloudFeignClient {

    public static final String ADMIN_PATH = "/admin";
    public static final String ADMIN_PATH_V1 = ADMIN_PATH + "/V1";

    public static final String BACKEND_PATH = "/backend";

    /**
     * 路由清单查询
     *
     * @param accessCondition
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:38
     */
    @Operation(summary = "路由清单查询")
    @PostMapping(value = ADMIN_PATH_V1 + "/access/list")
    ApiResponse queryAccess(@RequestBody AccessCondition accessCondition);

    /**
     * 路由详情
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:39
     */
    @Operation(summary = "路由详情")
    @PostMapping(value = ADMIN_PATH_V1 + "/access/detail")
    ApiResponse getAccess(@RequestBody IdCmd idCmd);

    /**
     * 路由编辑
     *
     * @param access
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:39
     */
    @Operation(summary = "路由编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/access/save")
    ApiResponse saveAccess(@RequestBody CpsAccessDTO access);


    /**
     * 用户账号明细
     *
     * @param userCode
     * @return com.liuyu.common.framework.response.ApiResponse<schema.model.CpsUserMain>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:40
     */
    @Operation(summary = "用户账号明细")
    @GetMapping(value = ADMIN_PATH_V1 + "/user/account/detail")
    ApiResponse<CpsUserMainDTO> prepareQueryAccount(@RequestParam(value = ADMIN_PATH_V1 + "/userCode") String userCode) throws Exception;

    /**
     * 用户账号清单
     *
     * @param userAccountCond
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page < com.liuyu.common.framework.power.account.vo.AccountVo>>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:40
     */
    @Operation(summary = "用户账号清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/list")
    ApiResponse<Page<AccountVo>> queryUserAccount(@RequestBody @Valid UserAccountCond userAccountCond) throws IOException;

    /**
     * 人员账号明细
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.power.account.vo.UserAccountVo>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:40
     */
    @Operation(summary = "人员账号明细")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/detail")
    ApiResponse<UserAccountVo> prepareAddUserAccount(@RequestBody IdCmd idCmd);

    /**
     * 获取账号的appKey 树
     *
     * @param userCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.common.vo.VueTree>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:41
     */
    @Operation(summary = "获取账号的tree")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/appKey/tree")
    ApiResponse<VueTree> getAccountSystem(@RequestBody QueryByUserCmd userCmd);

    /**
     * 账号编辑
     *
     * @param account
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.power.account.vo.UserAccountVo>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:41
     */
    @Operation(summary = "账号编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/save")
    ApiResponse<UserAccountVo> saveAccount(@RequestBody UserAccountVo account) throws Exception;


    /**
     * 账号管理appKey 编辑
     *
     * @param appKeyCmd
     * @return com.liuyu.common.framework.response.ApiResponse<java.lang.Boolean>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:41
     */
    @Operation(summary = "账号管理系统编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/appKey/save")
    ApiResponse<Boolean> saveAccountAppKey(@RequestBody AccountAppKeyCmd appKeyCmd) throws IOException;

    /**
     * 人员账号密码校验
     *
     * @param password
     * @return com.liuyu.common.framework.response.ApiResponse<java.lang.Boolean>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:42
     */
    @Operation(summary = "人员账号密码校验")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/password/check")
    ApiResponse<Boolean> checkOldPwd(@RequestBody PassWordVo password) throws IOException;

    /**
     * 账号激活 使用restful 风格。
     *
     * @param validataCode
     * @return
     */

    @Operation(summary = "人员账号自己激活")
    @GetMapping(value = ADMIN_PATH_V1 + "/account/active/{validatacode}")
    ApiResponse active(@PathVariable(value = "validatacode") String validataCode);


    /**
     * 人员账号激活
     *
     * @param activeCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:42
     */
    @Operation(summary = "人员账号激活")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/active")
    ApiResponse activeDirect(@RequestBody ActiveCmd activeCmd);


    /**
     * 弱密码扫描
     *
     * @param weakPasswordScanCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:42
     */
    @Operation(summary = "弱密码扫描")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/weak/password/scan")
    ApiResponse weakPasswordScan(@RequestBody WeakPasswordScanCmd weakPasswordScanCmd);


    // selfaccountController

    /**
     * 准备创建密码修改
     *
     * @param appKey
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:45
     */
    //准备创建密码修改
    @Operation(summary = "生成应用Id token")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/prepare/change/pwd")
    ApiResponse prepareChangePwd(@RequestBody @RequestParam(value = ADMIN_PATH_V1 + "/appKey", required = false) String appKey);


    /**
     * 通过token 发送邮件
     *
     * @param email
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:46
     */
    @Operation(summary = "通过token 发送邮件")
    @PostMapping(value = ADMIN_PATH_V1 + "/send/change/password/email")
    ApiResponse sendChpEmail(@RequestBody EmailCmd email);

    /**
     * 通过token 发送短信
     *
     * @param emailCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:47
     */
    @Operation(summary = "通过token 发送邮件")
    @PostMapping(value = ADMIN_PATH_V1 + "/send/change/password/mobile")
    ApiResponse sendChpMobile(@RequestBody EmailCmd emailCmd);

    /**
     * 自己找回密码
     *
     * @param findAccountCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:47
     */
    @Operation(summary = "自己找回密码")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/find/pwd/self")
    ApiResponse forgetpwdself(@RequestBody FindAccountCmd findAccountCmd);

    /**
     * 人员账号密码重置
     *
     * @param findAccountCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:47
     */
    @Operation(summary = "人员账号密码重置")
    @PostMapping(value = ADMIN_PATH_V1 + "/account/reset/password")
    ApiResponse doPasswordReset(@RequestBody FindAccountCmd findAccountCmd);


    //appController

    /**
     * 查询应用清单
     *
     * @param appCondition
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page < com.liuyu.common.framework.power.app.vo.AppVo>>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:49
     */
    @Operation(summary = "应用清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/application/list")
    ApiResponse<Page<AppVo>> queryApplication(@RequestBody AppCondition appCondition);

    /**
     * 获取应用明细
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:49
     */
    @Operation(summary = "应用明细")
    @PostMapping(value = ADMIN_PATH_V1 + "/application/detail")
    ApiResponse prepareApplicationForEdit(@RequestBody IdCmd idCmd);

    /**
     * 应用编辑
     *
     * @param application
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:49
     */
    @Operation(summary = "应用编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/application/save")
    ApiResponse saveApplication(@RequestBody AppInfoVo application);

    /**
     * 应用代码校验
     *
     * @param appCmd
     * @return com.liuyu.common.framework.response.ApiResponse<java.lang.Boolean>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:49
     */
    @Operation(summary = "应用代码校验")
    @PostMapping(value = ADMIN_PATH_V1 + "/application/check")
    ApiResponse<Boolean> checkAppKey(@RequestBody AppCmd appCmd) throws IOException;

    /**
     * 应用设置明细
     *
     * @param appCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.power.app.vo.AppSettingVo>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:51
     */
    @Operation(summary = "应用设置明细")
    @PostMapping(value = ADMIN_PATH_V1 + "/app/setting/detail")
    ApiResponse<AppSettingVo> appSettingDetail(@RequestBody AppCmd appCmd);

    /**
     * 应用设置编辑
     *
     * @param appSetting
     * @return com.liuyu.common.framework.response.ApiResponse<java.lang.Integer>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:51
     */
    @Operation(summary = "应用设置编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/app/setting/save")
    ApiResponse<Integer> saveAppSetting(@RequestBody CpsAppConfDTO appSetting);

    /**
     * 应用岗位配置清单
     *
     * @param appCondition
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:51
     */
    @Operation(summary = "应用岗位配置清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/app/grade/conf/list")
    ApiResponse<Page> queryAppGradeConfig(@RequestBody AppGradeConfCond appCondition);

    /**
     * 应用岗位配置保存
     *
     * @param appGradeConfVo
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:51
     */
    @Operation(summary = "应用岗位配置保存")
    @PostMapping(value = ADMIN_PATH_V1 + "/app/grade/conf/save")
    ApiResponse saveAppGradeConf(@RequestBody AppGradeConfVo appGradeConfVo) throws IOException;

    /**
     * 应用岗位配置树
     *
     * @param gradeTreeCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.common.vo.VueTree>
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:51
     */
    @Operation(summary = "应用岗位配置树")
    @PostMapping(value = ADMIN_PATH_V1 + "/app/grade/tree")
    ApiResponse<VueTree> getAppGradeTree(@RequestBody GradeTreeCmd gradeTreeCmd) throws IOException;

    /**
     * 应用岗位编辑
     *
     * @param appGradeVo
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 14:51
     */
    @Operation(summary = "应用岗位编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/app/grade/save")
    ApiResponse saveAppGrade(@RequestBody AppGradeVo appGradeVo);


    // securityAdminController

    /**
     * 通过ajax 修改密码
     *
     * @return
     */

    @Operation(summary = "自行修改密码", description = "自行修改密码")
    @PostMapping(value = ADMIN_PATH_V1 + "/security/password/change")
    ApiResponse changePwd(@RequestBody SecurityCmd securityCmd);


    /**
     * 通过ajax 修改密码
     *
     * @return
     */

    @Operation(summary = "密码强度校验", description = "密码强度校验：旧密码无需校验，新密码才需要校验，传输需要进行加密")
    @PostMapping(value = ADMIN_PATH_V1 + "/security/password/meter")
    ApiResponse checkPwdMeter(@RequestBody SecurityCmd securityCmd);


    /**
     * 检查账号的旧密码 ，
     *
     * @param securityCmd 账号，邮箱，手机号
     * @return
     */
    @Operation(summary = "检验旧密码", description = "自行修改密码")
    @PostMapping(value = {"/security/password/check"})
    ApiResponse checkOldPwd(@RequestBody SecurityCmd securityCmd);

    /**
     * 直接修改密码,支持账号，邮箱，手机号修改。
     *
     * @param securityCmd
     * @return
     */
    @Operation(summary = "密码重置", description = "密码重置")
    @PostMapping(value = ADMIN_PATH_V1 + "/security/password/reset")
    ApiResponse changePassWord(@RequestBody SecurityCmd securityCmd);

    /**
     * 账号激活 使用restful 风格。
     *
     * @param validataCode
     * @return
     */
    @Operation(summary = "帐号激活", description = "帐号激活")
    @GetMapping(value = {"/security/account/active/{validatacode},"})
    ApiResponse accountActive(@PathVariable(value = ADMIN_PATH_V1 + "/validatacode") String validataCode);

    /**
     * 找回密码，通过两种方式 邮箱密码，手机验证码找回。
     *
     * @param type
     * @return
     */
    /**
     * 准备创建密码修改
     */
    @Operation(summary = "通过帐号自行找回密码", description = "通过帐号自行找回密码")
    @PostMapping(value = {"/security/password/find"})
    ApiResponse prepareChangePassword(@RequestBody @RequestParam(value = ADMIN_PATH_V1 + "/userCode") String userCode);


    /**
     * 直接修改密码,支持账号，邮箱，手机号修改。
     *
     * @param securityCmd
     * @return
     */
    @Operation(summary = "用户自行密码重置", description = "用户自行密码重置")
    @PostMapping(value = {"/security/password/reset/self"})
    ApiResponse changePassWordSelf(@RequestBody SecurityCmd securityCmd);

    /**
     * 短信验证，非登录时验证使用
     *
     * @param securityCmd
     * @return
     */
    @Operation(summary = "短信验证码", description = "非登录时验证使用 短信验证码：每个手机号，每天最多10条，VerificationService 进行验证和核销")
    @PostMapping(value = ADMIN_PATH_V1 + "/openapi/phone/validatacode")
    ApiResponse phone(@RequestBody SecurityCmd securityCmd);

    /**
     * 短信验证，非登录时验证使用
     *
     * @param securityCmd
     * @return
     */
    @Operation(summary = "短信验证码", description = "登录后的关键功能验证 短信验证码：每个手机号，每天最多100条,使用VerificationService 进行验证和核销")
    @PostMapping(value = {ADMIN_PATH_V1 + "/security/phone/validatacode"})
    ApiResponse phoneValidataCode(@RequestBody SecurityCmd securityCmd);

    //AdminCommonController

    /**
     * 获取 getCode
     *
     * @param codeCondition
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page < com.liuyu.common.framework.common.service.vo.CommonCode>>
     * @description
     * @author liuyu
     * @date 2020/4/13 20:55
     */
    @Operation(summary = "获取getCode")
    @PostMapping(value = ADMIN_PATH_V1 + "/getCode")
    ApiResponse<Page<CommonCode>> getCode(@RequestBody CodeCondition codeCondition);

    /**
     * @param translateReq
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:11
     */
    @Operation(summary = "获取代码翻译")
    @PostMapping(value = ADMIN_PATH_V1 + "/translateCode")
    ApiResponse translateCode(@RequestBody TranslateReq translateReq) throws IOException;


//    CommonCodeController

    /**
     * 通用代码明细
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:14
     */
    @Operation(summary = "通用代码明细")
    @PostMapping(value = ADMIN_PATH_V1 + "/common/code/detail")
    ApiResponse prepareCommonCodeForEdit(@RequestBody IdCmd idCmd);

    /**
     * 通用代码清单
     *
     * @param commonCodeCondition
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:14
     */
    @Operation(summary = "通用代码清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/common/code/list")
    ApiResponse queryCommonCode(@RequestBody CommonCodeCondition commonCodeCondition);

    /**
     * 通用代码编辑
     *
     * @param commonCode
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:14
     */
    @Operation(summary = "通用代码编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/common/code/save")
    ApiResponse saveCommonCode(@RequestBody CpsCommonCodeDTO commonCode);


//    CommonTypeController

    /**
     * 通用代码类型
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.power.commontype.vo.CommonTypeVo>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:16
     */
    @Operation(summary = "通用代码类型")
    @PostMapping(value = ADMIN_PATH_V1 + "/common/type/detail")
    ApiResponse<CommonTypeVo> commonTypeDetail(@RequestBody IdCmd idCmd);

    /**
     * 通用代码类型清单
     *
     * @param commonTypeCond
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page < com.liuyu.common.framework.power.commontype.vo.CommonTypeVo>>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:17
     */
    @Operation(summary = "通用代码类型清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/commonType/list")
    ApiResponse<Page<CommonTypeVo>> commonTypeList(@RequestBody CommonTypeCond commonTypeCond);

    /**
     * 通用代码类型编辑
     *
     * @param commonTypeVo
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:17
     */
    @Operation(summary = "通用代码类型编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/common/type/save")
    ApiResponse saveCommonType(@RequestBody CommonTypeVo commonTypeVo);


//    CompanyController

    /**
     * 组织机构清单
     *
     * @param companyCondition
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:24
     */
    @Operation(summary = "组织机构清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/company/list")
    ApiResponse<Page> queryCompany(@RequestBody CompanyCondition companyCondition) throws IOException;

    /**
     * 根据机构代码检查是否存在
     *
     * @param comCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:24
     */
    @Operation(summary = "根据机构代码检查是否存在", description = "根据机构代码检查是否存在")
    @PostMapping(value = ADMIN_PATH_V1 + "/comCode/check")
    ApiResponse checkComCode(@RequestBody ComCmd comCmd) throws IOException;

    /**
     * 保存或者更新机构
     *
     * @param company
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:24
     */
    @Operation(summary = "保存或者更新机构", description = "保存或者更新机构")
    @PostMapping(value = ADMIN_PATH_V1 + "/company/save")
    ApiResponse saveCompany(@RequestBody CompanyInfoVo company);

    /**
     * 组织机构明细
     *
     * @param comCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:24
     */

    @Operation(summary = "组织机构明细", description = "组织机构明细")
    @PostMapping(value = ADMIN_PATH_V1 + "/company/detail")
    ApiResponse prepareCompanyEdit(@RequestBody ComCmd comCmd);

    //

    /**
     * 数据字典类型管理
     *
     * @param dataDictionaryType
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:36
     */
    @Operation(summary = "数据字典类型管理", description = "数据字典类型管理")
    @PostMapping(value = ADMIN_PATH_V1 + "/admin/data/dictionary/type/save")
    ApiResponse saveDataDictionaryType(@RequestBody CpsDataDictionaryTypeDTO dataDictionaryType);

    /**
     * 数据字典类型清单
     *
     * @param dictionaryTypeQuery
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:36
     */
    @Operation(summary = "数据字典类型清单", description = "数据字典类型清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/admin/data/dictionary/type/list")
    ApiResponse listDataDictionaryType(@RequestBody CpsDataDictionaryTypeQuery dictionaryTypeQuery);


    /**
     * 数据字典管理
     *
     * @param dataDictionary
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:36
     */
    @Operation(summary = "数据字典管理", description = "数据字典管理")
    @PostMapping(value = ADMIN_PATH_V1 + "/admin/data/dictionary/save")
    ApiResponse saveDataDictionary(@RequestBody CpsDataDictionaryVO dataDictionary);

    /**
     * 数据字典清单
     *
     * @param dictionaryTypeQuery
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:36
     */
    @Operation(summary = "数据字典清单", description = "数据字典清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/admin/data/dictionary/list")
    ApiResponse listDataDictionary(@RequestBody CpsDataDictionaryQuery dictionaryTypeQuery);

    //MenuController

    /**
     * 菜单明细
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @description
     * @author liuyu
     * @date 2020/3/31 9:39
     */
    @Operation(summary = "菜单明细")
    @PostMapping(value = ADMIN_PATH_V1 + "/menu/detail")
    ApiResponse prepareMenuForEdit(@RequestBody IdCmd idCmd);

    /**
     * 菜单清单
     *
     * @param menuCondition
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:40
     */
    @Operation(summary = "菜单清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/menu/list")
    ApiResponse<Page> queryMenu(@RequestBody MenuCondition menuCondition);


    /**
     * 保存菜单
     *
     * @param menu
     * @return com.liuyu.common.framework.response.ApiResponse
     * @description
     * @author liuyu
     * @date 2020/3/31 9:05
     */
    @PostMapping(value = ADMIN_PATH_V1 + "/menu/save")
    ApiResponse saveMenu(@RequestBody MenuVo menu);

    /**
     * 菜单展示
     *
     * @param showMenuCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:41
     */
    @PostMapping(value = ADMIN_PATH_V1 + "/menu/show")
    ApiResponse showMenu(@RequestBody ShowMenuCmd showMenuCmd);

    //AdminOauthController

    /**
     * 编辑oauth 客户端
     *
     * @param oauthClientDetailVo
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:42
     */
    @Operation(summary = "编辑oauth 客户端")
    @PostMapping(value = ADMIN_PATH_V1 + "/oauth/client/save")
    ApiResponse saveClientDetails(@RequestBody OauthClientDetailVo oauthClientDetailVo);

    /**
     * oauth 客户详情
     *
     * @param oauthClientCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:42
     */
    @Operation(summary = "编辑oauth 客户端")
    @PostMapping(value = ADMIN_PATH_V1 + "/oauth/client/detail")
    ApiResponse clientDetails(@RequestBody OauthClientCmd oauthClientCmd);

    /**
     * oauth客户端清单
     *
     * @param oauthClientCond
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:43
     */
    @Operation(summary = "oauth客户端清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/oauth/client/list")
    ApiResponse<Page> queryClientDetails(@RequestBody @Valid OauthClientCond oauthClientCond);


    //TaglibController

    /**
     * 标签保存
     *
     * @param taglib
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:44
     */
    @Operation(summary = "标签保存")
    @PostMapping("taglib/save")
    ApiResponse saveTaglib(@RequestBody CpsTagLibDTO taglib);

    /**
     * 标签清单
     *
     * @param taglibCondition
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:44
     */
    @Operation(summary = "标签清单")
    @PostMapping("taglib/list")
    ApiResponse queryTaglib(@RequestBody TaglibCondition taglibCondition);

    /**
     * 标签明细树
     *
     * @param tagDetailTreeCmd
     * @return java.util.List<com.liuyu.common.framework.power.taglib.vo.TagDetailTreeVo>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:44
     */
    @Operation(summary = "标签明细树")
    @PostMapping("tag/detail/tree")
    ApiResponse<List<TagDetailTreeVo>> getTagDetailTree(@RequestBody TagDetailTreeCmd tagDetailTreeCmd);

    /**
     * 标签明细
     *
     * @param id
     * @return schema.model.CpsTagLibDetail
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:44
     */

    @Operation(summary = "标签明细")
    @PostMapping("tag/detail/detail")
    ApiResponse<CpsTagLibDetailDTO> getTagDetail(@RequestParam("id") Integer id);

    /**
     * 标签明细保存
     *
     * @param detail
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:44
     */
    @Operation(summary = "标签明细保存")
    @PostMapping("tag/detail/save")
    ApiResponse saveTagDetail(@RequestBody CpsTagLibDetailDTO detail);

    @Operation(summary = "标签删除")
    @DeleteMapping("taglib/delete")
    ApiResponse deleteTaglib(@RequestBody IdCmd idCmd);

    @Operation(summary = "标签详情")
    @PostMapping("taglib/detail")
    ApiResponse getTagLib(@RequestBody IdCmd idCmd);

    @Operation(summary = "标签初始化")
    @PostMapping("taglib/init")
    ApiResponse initTag(@RequestBody TagDetailCmd tagDetailCmd);

    @Operation(summary = "标签明细删除")
    @DeleteMapping("tagDetail/delete")
    ApiResponse deleteTagDetail(@RequestBody IdCmd idCmd);

//    TaskController

    /**
     * 功能代码明细
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.power.task.vo.TaskVo>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:46
     */
    @Operation(summary = ("功能代码明细"))
    @PostMapping(value = ADMIN_PATH_V1 + "/task/detail")
    ApiResponse<TaskVo> prepareAddTask(@RequestBody IdCmd idCmd);

    /**
     * 功能代码编辑
     *
     * @param task
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:46
     */
    @Operation(summary = ("功能代码编辑"))
    @PostMapping(value = ADMIN_PATH_V1 + "/task/save")
    ApiResponse saveTask(@RequestBody TaskVo task);

    /**
     * 功能代码删除
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:46
     */

    @Operation(summary = "功能代码删除")
    @PostMapping(value = ADMIN_PATH_V1 + "/task/delete")
    ApiResponse deleteTask(@RequestBody IdCmd idCmd) throws IOException;

    /**
     * 功能代码校验
     *
     * @param taskCode
     * @return com.liuyu.common.framework.response.ApiResponse<java.lang.Boolean>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:46
     */
    @Operation(summary = "功能代码校验")
    @PostMapping(value = ADMIN_PATH_V1 + "/taskCode/check")
    ApiResponse<Boolean> checkTaskCode(@RequestParam(value = ADMIN_PATH_V1 + "/taskCode") String taskCode) throws IOException;

    /**
     * 功能代码清单
     *
     * @param taskCondition
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page < com.liuyu.common.framework.power.task.vo.TaskCodeResult>>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:46
     */
    @Operation(summary = "功能代码清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/task/list")
    ApiResponse<Page<TaskCodeResult>> queryTask(@RequestBody TaskCondition taskCondition) throws IOException;


//    MsgTemplateController

    /**
     * 消息模板清单
     *
     * @param msgTemplateCondition
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:49
     */
    @Operation(summary = "消息模板清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/msg/template/list")
    ApiResponse queryMsgTemplate(@RequestBody MsgTemplateCondition msgTemplateCondition);

    /**
     * 消息模板明细
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:50
     */
    @Operation(summary = "消息模板明细")
    @PostMapping(value = ADMIN_PATH_V1 + "/msg/template/detail")
    ApiResponse prepareMsgTemplateForEdit(@RequestBody IdCmd idCmd);

    /**
     * 消息模板编辑
     *
     * @param msgTemplate
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:50
     */
    @Operation(summary = "消息模板编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/msg/template/save")
    ApiResponse saveMsgTemplate(@RequestBody CpsMsgTemplateDTO msgTemplate);

    /**
     * 消息模板内容编辑
     *
     * @param msgContentCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:50
     */
    @Operation(summary = "消息模板内容编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/msg/content/save")
    ApiResponse saveMsgContent(@RequestBody MsgContentCmd msgContentCmd);


//    UserController

    /**
     * 新增用户，用户修改，密码修改初始化
     *
     * @param userCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.power.user.vo.UserVo>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:55
     */
    @Operation(summary = "用户明细")
    @PostMapping(value = ADMIN_PATH_V1 + "/user/detail")
    ApiResponse<UserVo> getUser(@RequestBody UserCmd userCmd);

    /**
     * 新增用户
     */
    /**
     * 新增用户
     *
     * @param userVo
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:55
     */
    @Operation(summary = "用户编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/user/save")
    ApiResponse saveUser(@RequestBody @Valid UserVo userVo);

    /**
     * 用户清单
     *
     * @param userCondition
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.utils.Page>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:55
     */
    @Operation(summary = "用户清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/user/list")
    ApiResponse<Page> queryUser(@RequestBody UserExtCondition userCondition);

    /**
     * 校验用户代码是否存在
     *
     * @param userCmd
     * @return com.liuyu.common.framework.response.ApiResponse<java.lang.Boolean>
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:55
     */
    @Operation(summary = "校验用户代码是否存在")
    @PostMapping(value = ADMIN_PATH_V1 + "/userCode/check")
    ApiResponse<Boolean> checkUserCode(@RequestBody UserCmd userCmd);

    /**
     * 用户导入清单
     *
     * @param userImport
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:55
     */
    @Operation(summary = "用户导入清单")
    @PostMapping(value = ADMIN_PATH_V1 + "/user/import")
    ApiResponse importUserAndPower(@RequestBody ImportData userImport);

//    UserGradeController


    /**
     * 获取人员清单 详情
     *
     * @param userCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.power.usergrade.vo.UserGradeVo>
     * @throws
     * @author liuyu
     * @date 2024/9/3 16:02
     */
    @Operation(summary = "获取人员清单，请使用/admin/user/list")
    @PostMapping(value = ADMIN_PATH_V1 + "/user/grade/detail")
    ApiResponse<UserGradeVo> getUserGrade(@RequestBody UserCmd userCmd);

    /**
     * 获取人员岗位树
     *
     * @param userGradeCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.common.vo.VueTree>
     * @throws
     * @author liuyu
     * @date 2024/9/3 16:02
     */
    @Operation(summary = "获取人员岗位树")
    @PostMapping(value = ADMIN_PATH_V1 + "/user/grade/tree")
    ApiResponse<VueTree> getUserGradeTree(@RequestBody UserGradeCmd userGradeCmd);

    /**
     * 获取人员岗位扩展信息
     *
     * @param userGradeCmd
     * @return com.liuyu.common.framework.response.ApiResponse<com.liuyu.common.framework.power.usergrade.vo.UserGradeExtendVo>
     * @throws
     * @author liuyu
     * @date 2024/9/3 16:03
     */
    @Operation(summary = "获取人员岗位扩展信息")
    @PostMapping(value = ADMIN_PATH_V1 + "/user/grade/extend")
    ApiResponse<UserGradeExtendVo> prepareUserGradeExtend(@RequestBody UserGradeCmd userGradeCmd);

    /**
     * 人员岗位编辑
     *
     * @param userGradeCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 16:03
     */
    @Operation(summary = "人员岗位编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/user/grade/save")
    ApiResponse saveUserGrade(@RequestBody UserGradeCmd userGradeCmd);

    /**
     * 人员岗位扩展编辑
     *
     * @param userGradeExtendVo
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 16:03
     */
    @Operation(summary = "人员岗位扩展编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/user/grade/extend/save")
    ApiResponse saveUserGradeExtend(@RequestBody UserGradeExtendVo userGradeExtendVo);


    /**
     * 获取应用的授权URL或者方法
     *
     * @param permitCmd
     * @return com.liuyu.common.framework.web.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2022/11/28 9:16
     */
    @Operation(summary = "获取应用的授权URL或者方法", description = "获取应用的授权URL或者方法")
    @PostMapping({BACKEND_PATH + "/permit/url/method/list"})
    ApiResponse getUrlOrMethod(@RequestBody PermitCmd permitCmd);


    /**
     * 通过sessionId 查找用户登录信息
     *
     * @param userHisQueryCmd
     * @return com.liuyu.common.framework.web.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2022/11/28 9:18
     */
    @Operation(summary = "通过sessionId 查找用户登录信息", description = "通过sessionId 查找用户登录信息")
    @PostMapping(BACKEND_PATH + "/user/his/sessionId")
    ApiResponse getUserHisBySessionId(@RequestBody UserHisQueryCmd userHisQueryCmd);

    /**
     * 用户登录轨迹新增编辑
     *
     * @param loginHis
     * @return com.liuyu.common.framework.power.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2022/12/30 15:06
     */
    @Operation(summary = "用户登录轨迹新增编辑", description = "用户登录轨迹新增编辑")
    @PostMapping(value = BACKEND_PATH + "/user/his/save")
    ApiResponse saveUserLoginHis(@RequestBody UserHisVo loginHis);


    /**
     * 菜单展示
     *
     * @param menuQueryCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:41
     */
    @PostMapping(value = ADMIN_PATH_V1 + "/user/menu/list")
    ApiResponse<List<CpsMenuDTO>> getMenu(@RequestBody MenuQueryCmd menuQueryCmd);


//    adminGradeController;

    /**
     * 岗位明细
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @description
     * @author liuyu
     * @date 2020/3/31 9:23
     */
    @Operation(summary = "岗位明细")
    @PostMapping(value = ADMIN_PATH_V1 + "/grade/detail")
    ApiResponse getGrade(@RequestBody IdCmd idCmd);

    /**
     * 岗位代码树
     *
     * @param gradeTaskTreeCond
     * @return com.liuyu.common.framework.response.ApiResponse
     * @description
     * @author liuyu
     * @date 2020/3/31 9:33
     */
    @Operation(summary = "岗位代码树")
    @PostMapping(value = ADMIN_PATH_V1 + "/grade/task/tree")
    ApiResponse getGradeTaskTree(@RequestBody GradeTaskTreeCond gradeTaskTreeCond);

    /**
     * 岗位编辑
     *
     * @param grade
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:38
     */
    @Operation(summary = "岗位编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/grade/save")
    ApiResponse saveGrade(@RequestBody GradeVo grade);


    /**
     * 岗位功能代码编辑
     *
     * @param gradeTaskTreeCond
     * @return com.liuyu.common.framework.response.ApiResponse
     * @description
     * @author liuyu
     * @date 2020/4/15 17:54
     */
    @Operation(summary = "岗位功能代码编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/grade/task/save")
    ApiResponse changeGradeTask(@RequestBody GradeTaskTreeCond gradeTaskTreeCond);

    /**
     * 岗位清单查询
     *
     * @param gradeCondition
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:39
     */
    @Operation(summary = "岗位清单查询")
    @PostMapping(value = ADMIN_PATH_V1 + "/grade/list")
    ApiResponse queryGradeList(@RequestBody GradeCondition gradeCondition);


    /**
     * 岗位扩展编辑
     *
     * @param gradeExtVo
     * @return com.liuyu.common.framework.response.ApiResponse
     * @description
     * @author liuyu
     * @date 2020/4/15 17:54
     */
    @Operation(summary = "岗位扩展编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/grade/ext/save")
    ApiResponse saveGradeExt(@RequestBody GradeExtVo gradeExtVo);

    /**
     * 岗位扩展清单查询
     *
     * @param gradeExtCond
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:39
     */

    @Operation(summary = "岗位扩展清单查询")
    @PostMapping(value = ADMIN_PATH_V1 + "/grade/ext/list")
    ApiResponse queryGradeExtList(@RequestBody @Valid GradeExtCond gradeExtCond);

    /**
     * 岗位扩展编辑
     *
     * @param idCmd
     * @return com.liuyu.common.framework.response.ApiResponse
     * @throws
     * @author liuyu
     * @date 2024/9/3 15:39
     */
    @Operation(summary = "岗位扩展编辑")
    @PostMapping(value = ADMIN_PATH_V1 + "/grade/ext/detail")
    ApiResponse gradeExtDetail(@RequestBody IdCmd idCmd);
}


